from Footle_Parser import *

class footleParseTester:
	def __init__(self, prog, ast):
		self.prog = prog
		self.parser = parserClass(prog)
		self.ast = ast
		self.generatedASTstr = ""
		self.aststr = str(ast)
	
	def test(self):
		generatedAST =	self.parser.parse()
		self.generatedASTstr =  str(generatedAST)
		return self.aststr == self.generatedASTstr
	
	def getErrorStr(self):
		return "Prog: " + str(self.prog) + "\nExpected: " + str(self.aststr) + "\nFound: "  + str(self.generatedASTstr) + "\n"
		
